<?php

function chronometer() {
    $time = explode(' ', microtime());
    return $time[0] + $time[1];
}

function startChronometer($label)
{
    $_GET["Chronometer_$label"] = chronometer();
}

function stopChronometer($label)
{
    return round(chronometer() - $_GET["Chronometer_$label"], 6);
}

?>
